FROM zhilink/ubuntu:14.04.1

RUN apt-get  update -y \
    && apt-get  install -y wget  gcc make \
    && wget http://download.redis.io/releases/redis-3.0.7.tar.gz \
    && tar xf redis-3.0.7.tar.gz && rm -rf redis-3.0.7.tar.gz\
    && mv  redis-3.0.7  /usr/local/redis \
    && cd  /usr/local/redis \
    && make MALLOC=libc && make  install \
    && mkdir /usr/local/redis/etc && mkdir /usr/local/redis/data && mkdir /usr/local/redis/logs 
    
COPY redis.conf /usr/local/redis/etc/
RUN cp  /usr/share/zoneinfo/Asia/Shanghai   /etc/localtime 
EXPOSE 6379
CMD ["redis-server","/usr/local/redis/etc/redis.conf"]


